package ink.xiaobaibai.bo;

import lombok.Data;

import javax.validation.constraints.Min;

/**
 * @description: 用户查询条件
 * @author: 小白白
 * @create: 2021-05-26
 **/

@Data
public class UserSelectBo {

    @Min(value = 1, message = "页码错误")
    private Integer pageNum = 1;

    @Min(value = 1, message = "页码错误")
    private Integer pageSize = 20;

    private Integer userId;

    private String username;

    private String userNumber;

    private Integer departmentId;

    private String userPhone;

    private Integer roleId;

    public Integer getLimitStart() {
        return (this.pageNum - 1) * this.pageSize;
    }

    public Integer getLimitEnd() {
        return this.pageSize;
    }

    public Integer getPageNum() {
        return this.pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public Integer getPageSize() {
        return this.pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getUserId() {
        return this.userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return this.username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getUserNumber() {
        return this.userNumber;
    }

    public void setUserNumber(String userNumber) {
        this.userNumber = userNumber;
    }

    public Integer getDepartmentId() {
        return this.departmentId;
    }

    public void setDepartmentId(Integer departmentId) {
        this.departmentId = departmentId;
    }

    public String getUserPhone() {
        return this.userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public Integer getRoleId() {
        return this.roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }
}
